<template>
  <el-card class="box-card el-card-flex componentsLibrary cardHover">
   <div slot="header" class="clearfix">
    <span><i class="el-title-adorn"></i> 文库</span>
    </div>
    <el-tabs>
      <el-tab-pane label="企业文档" style="height: 270px;overflow: hidden;">
        <ul class="news-list">
          <li class="news-li notice-li">
            <i class="list-dot"></i>陈霞霞的报销申请
          </li>
        </ul>
      </el-tab-pane>
      <el-tab-pane label="内部文档" style="height: 270px;overflow: hidden;"></el-tab-pane>
      <el-tab-pane label="项目文档" style="height: 270px;overflow: hidden;"></el-tab-pane>
    </el-tabs>
    <i @click="handDelProject" class="el-icon-close closeIcon"></i>
  </el-card>
</template>
<script>
import { MessageBox, Message, Tabs, TabPane } from 'element-ui'
export default {
  components: {
    'el-tabs': Tabs, // 标签页
    'el-tab-pane': TabPane, // 标签页列
  },
  data () {
    return {
      activeName: 'ongoing',
    }
  },
  methods: {
    // 显示编辑项目弹框
    editEvent () {
      this.$emit('editEvent')
    },
    // 删除任意一个布局里的项目
    handDelProject () {
      this.$emit('handDelProject')
    },
  }
}
</script>
<style lang="scss">
.componentsLibrary {
  padding: 0 10px;
  margin-bottom: 10px;
  position: relative;
  left: 0;
  top: 0;
  text-align: left;
  .closeIcon {
    position: absolute;
    right: 0;
    top: 0;
    padding: 3px;
    border-radius: 50%;
    background-color: #eeeeee;
    display: none;
  }
  .el-title-adorn {
    border-left: 3px solid #409EFF;
		display: inline-block;
		margin-right: 2px;
		height: 16px;
		vertical-align: middle;
		margin-top: -2px;
  }
  .el-card__header {
    border-bottom: none;
    padding: 5px 0 0 0;
  }
  .news-list {
    width: calc(100% + 25px);
    height: 100%;
    overflow: auto;
    cursor: pointer;
    .news-li {
      width: calc(100% - 25px);
      line-height: 25px;
      font-size: 12px;
      position: relative;
      padding: 5px;
      border-bottom: 1px solid #F4F6FC;
      box-sizing: border-box;
      display: table;
      text-align: left;
      &:hover {
        color: #409EFF;
        text-decoration: underline;
      }
    }
    .notice-li {
      font-size: 12px;
      color: #333333;
      &:hover {
        background-color: #F4F6FC;
      }
    }
    .list-icon {
      margin-right: 5px;
      color: #1890FF;
      font-size: 16px;
      vertical-align: middle;
    }
    .list-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      display: inline-block;
      vertical-align: middle;
      border: 1px solid #1890FF;
      box-sizing: border-box;
      margin-right: 10px;
    }
    .list-dot.active {
      background-color: #1890FF;
    }
  }
}
.cardHover {
  &:hover {
    background-color: rgba(254,227,78,.1);
    border: 1px dashed #fb9c68;
    .closeIcon {
      display: block;
    }
  }
}
</style>